import { departList,planBussType } from '@/utils/data'
import httpRequest from '@/utils/httpRequest'


export const tableOption = {
	searchMenuSpan: 4,
	columnBtn: false,
	border: true,
	index: false,
	indexLabel: '序号',
	stripe: true,
	menuAlign: 'center',
	align: 'center',
	addBtn: false,
	editBtn: false,
	delBtn: false,
	menu: false,
	highlightCurrentRow: true,
	searchSpan: 5,
	menuWidth: 100,
	showSummary: true,
	selection: false,
	sumColumnList: [
		{ label: '合计:', name: 'custom', type: '' },
		{ name: "sr", type: 'sum' },
		{ name: "sjsr", type: 'sum' },
		{ name: "hk", type: 'sum' },
		{ name: "sjhk", type: 'sum' },
		{ name: "fy", type: 'sum' },
	],
	column: [
		{ label: '', prop: 'radio', width: 60, hide: false,addDisplay: false, },
		{ label: '序号', prop: 'index', width: 60,addDisplay: false,},
		{
			label: '部门',
			prop: 'deptName', // dept_id → deptId
			// search: true,
			cell: true,
			type: 'select',
			dicData: departList,
		},
		// {
		// 	label: '客户ID',
		// 	prop: 'custId', // cust_id → custId
		// 	cell: true,
		// 	type: 'select',
		// 	props: {
		// 		label: "custName",
		// 		value: "custName",
		// 	},
		// 	dicData: cusList
		// },
		{
			label: '客户名称',
			prop: 'custName', // cust_id → custId
			search: true,
			cell: true,
			type: 'select',
			// props: {
			// 	label: "label",
			// 	value: "id",
			// },
			dicData: []
		},
		{
			label: '业务类型',
			prop: 'planBussType', // plan_buss_type → planBussType
			type: 'select',
			cell: true,
			dicData:planBussType
		},
		{
			label: '负责人',
			prop: 'deptEmpName', // dept_emp_no → deptEmpNo
			search: true,
			cell: true,
			type: 'select',
			// props: {
			// 	label: "empName",
			// 	value: "empName",

			// },
			dicData: [],
		},
		{
			label: '部门bu代码',
			prop: 'deptBuNo', // dept_bu_no → deptBuNo
			addDisplay: false,

			type: 'select',
			dicData: []
		},
		{
			label: '部门bu名称',
			prop: 'deptBuName', // dept_bu_name → deptBuName

			addDisplay: false,
			type: 'select',
			dicData: []
		},
		{
			label: '计划年份',
			prop: 'planYear', // plan_year → planYear
			type: 'year',
			format: 'yyyy',
			
			valueFormat: 'yyyy'
		},
		{
			label: '计划月份',
			prop: 'planMonth', // plan_month → planMonth
			type: 'month',
			format: 'MM',
			search: true,
			valueFormat: 'MM'
		},
		{
			label: '计划销售金额',
			prop: 'planSalesAmt' // plan_sales_amt → planSalesAmt
		},
		{
			label: '实际销售金额',
			addDisplay: false,
			prop: 'factSalesAmt' // fact_sales_amt → factSalesAmt
		},
		{
			label: '计划回款金额',
			prop: 'planFeedbackAmt' // plan_feedback_amt → planFeedbackAmt
		},
		{
			label: '实际回款金额',
			addDisplay: false,
			prop: 'factFeedbackAmt' // fact_feedback_amt → factFeedbackAmt
		},
		{
			label: '状态',
			addDisplay: false,
			prop: 'status' // 保持不变
		},
		{
			label: '创建日期',
			addDisplay: false,
			prop: 'createDate' // create_date → createDate（修正末尾空格）
		},
		{
			label: '创建人',
			addDisplay: false,
			prop: 'createBy' // create_by → createBy（修正末尾空格）
		},
		{
			label: '最后修改人',
			addDisplay: false,
			prop: 'lstUpdBy' // lst_upd_by → lstUpdBy（修正末尾空格）
		},
		{
			label: '最后修改日期',
			addDisplay: false,
			prop: 'lstUpdDate' // lst_upd_date → lstUpdDate（修正末尾空格）
		},
		{
			label: '审核人',
			addDisplay: false,
			prop: 'auditBy' // audit_by → auditBy（修正末尾空格）
		},
		{
			label: '关联上级计划',
			addDisplay: false,
			prop: 'parentId' // parent_id → parentId（修正末尾空格）
		},
		{
			label: '备注1',
			prop: 'biz1'
		},
		{
			label: '备注2',
			prop: 'biz2'
		},
		{
			label: '备注3',
			prop: 'biz3'
		},
		{
			label: '备注4',
			prop: 'biz4'
		},
		{
			label: '备注5',
			prop: 'biz5'
		},
		{
			label: 'd备注1',
			prop: 'dbiz1' // 修正末尾空格
		},
		{
			label: 'd备注2',
			prop: 'dbiz2' // 修正末尾空格
		},
		{
			label: 'd备注3',
			prop: 'dbiz3' // 修正末尾空格
		},
		{
			label: 'd备注4',
			prop: 'dbiz4' // 修正末尾空格
		},
		{
			label: 'd备注5',
			prop: 'dbiz5' // 修正末尾空格
		}
	]


}
